#include "summater.h"
#include <QDebug>

Summater::Summater(QObject *p):QObject(p)
{
   m_a=0;
   m_b=0;
}

void Summater::setA(int a)
{
    if (m_a != a)
    {        
        m_a=a;
       // emit valueChanged ();
    }

}
void Summater::setB(int b)
{
    if (m_b != b)
    {        
        m_b=b;
       // emit valueChanged ();
    }
}

int Summater::sum() const
{
    return (m_a+m_b);
}

void valueChanged()
{    
      qDebug() << "Value changed from" /*<< oldValue << "to" <<newValue*/;
}
